/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package liebautclient;

import ejb.model.EJBModel;
import ejb.person.LanguageBeanRemote;
import gui.StatusBar;
import gui.TabbedPane;
import gui.menu.Menu;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.ejb.EJB;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import model.gui.MenuModel;

/**
 *
 * @author Gebruiker
 */
public class LiebautClient {

    @EJB
    private static LanguageBeanRemote foo;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            // Set System L&F
            UIManager.setLookAndFeel(
                    UIManager.getSystemLookAndFeelClassName());
        } catch (UnsupportedLookAndFeelException e) {
            // handle exception
        } catch (ClassNotFoundException e) {
            // handle exception
        } catch (InstantiationException e) {
            // handle exception
        } catch (IllegalAccessException e) {
            // handle exception
        }
        EJBModel.initiate();
        JFrame window = new JFrame("Liebaut NV.");
        window.setLayout(new BorderLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 0;
        gbc.fill = GridBagConstraints.BOTH;
        StatusBar status = new StatusBar();
        TabbedPane contentPane = new TabbedPane();
        MenuModel model = new MenuModel(contentPane,status);
        window.setJMenuBar(new Menu(model));
        Container content = window.getContentPane();
        
        gbc.gridy ++;
        //gbc.fill = GridBagCOn
        contentPane.setPreferredSize(new Dimension(1517,792));
        content.add(contentPane);
        content.add(status, BorderLayout.SOUTH);
        //window.setContentPane(contentPane);
        window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //window.setExtendedState(JFrame.MAXIMIZED_BOTH);
        //window.setPreferredSize(new Dimension(700,640));
        window.pack();
        window.setVisible(true);
    }
}
